package a66weding.com.jiehuntong.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.DebugUtils;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;

import org.xutils.common.util.DensityUtil;

import a66weding.com.jiehuntong.R;

/**
 * @version :
 * @creator : AxDu
 * @create-time : 2016/5/23
 * @description :
 */
public class StretchView extends View {
    private Paint mPaint;
    private float scopicAmount;
    private int width;
    private int left;
    private int top;
    private int right;
    private int bottom;

    private int maxWidth;
    private int minWidth;
    private int mScaleWidth;
    private int mScaleDir;

    private static final int LEFTDIR = 1;
    private static final int RIGHTDIR = 2;


    public StretchView(Context context) {
        super(context);
        initview();
    }

    public StretchView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initview();
    }

    public StretchView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initview();
    }

    public void initview() {
        mPaint = new Paint();
        mPaint.setColor(Color.GREEN);
        mPaint.setStyle(Paint.Style.FILL);
    }

    public void setMaxWidth(int maxWidth, int minWidth) {
        this.maxWidth = maxWidth;
        this.minWidth = minWidth;

    }

    public void setScopicAmount(float scopicAmount, int mScaleWidth, int scaleDir) {
        this.scopicAmount = scopicAmount;
        this.mScaleWidth = mScaleWidth;
        this.mScaleDir = scaleDir;
        postInvalidate();
    }

    @Override
    protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;


        super.onLayout(changed, left, top, right, bottom);
    }


    @Override
    protected void onDraw(Canvas canvas) {

        super.onDraw(canvas);


    }


}
